package springMVC.getParams.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.SessionAttribute;

/**
 * @Author quan
 * @Description 获取session
 * @Date 2023/7/22 17:35
 */

@RestController
@RequestMapping("/web")
public class Demo9_GetSession {
    //默认要传参
    @RequestMapping("/get9")
    public String get9(@SessionAttribute(required = false) String username){
        return "username"+username;
    }
}
